<!--
 * @Author: chunlai
 * @Date: 2025-07-01 10:40:21
 * @LastEditTime: 2025-08-12 16:19:53
 * @LastEditors: minsheng_insurance_agency_zhoucl
 * @FilePath: \02.bldinsure\src\views\form\components\HtmlProtocol.vue
 * @Description: 文本协议阅读
-->
<template>
  <van-overlay
    :show="showfile"
    @click="showfile = false"
    :lock-scroll="false"
    z-index="1000"
  >
    <div class="wrapper" @click.stop>
      <div class="block">
        <div class="block-md">
          <p>{{ conts.label }}</p>
          <div class="file-box">
            <div v-html="conts.html"></div>
          </div>
          <div class="close-btn">
            <span @click="showfile = false">我已阅读并接受</span>
          </div>
        </div>
      </div>
    </div>
  </van-overlay>
</template>

<script>
export default {
  name: "HtmlProtocol",
  components: {},
  data() {
    return {
      conts: {},
      showfile: false,
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    initModal(conts) {
      this.conts = conts;
      this.showfile = true;
    },
  },
};
</script>
<style lang="less" scoped>
.wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  .block {
    width: 90%;
    height: 80%;
    border-radius: 10px;
    background-color: #fff;
    overflow: hidden;
    .block-md {
      width: 100%;
      height: 100%;
      p {
        height: 50px;
        line-height: 50px;
        font-size: 16px;
        text-align: center;
        background-color: #fff;
      }
      .file-box {
        height: calc(100% - 100px);
        overflow: hidden;
        overflow-y: scroll;
        padding: 0 10px;
      }
      .close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 50px;
        background-color: #fff;
        span {
          width: 90%;
          height: 36px;
          line-height: 36px;
          border-radius: 18px;
          background-color: #f73932;
          color: #fff;
          text-align: center;
        }
      }
    }
  }
}
</style>
